package saas.adapter.sdk.core.hook;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.client.hook.SendMessageContext;
import org.apache.rocketmq.client.hook.SendMessageHook;
import saas.adapter.sdk.constant.Constants;

/**
 * @title: RmqSendSaasTenantMappingHook
 * @description: Rmq生产Saas租户映射钩子（本系统生产RMQ消息给下游）
 * @author: guan.xin
 * @create: 2021-11-12 12:21
 * @since: JDK8
 */
@Slf4j
public class RmqProducerTenantConversionHook implements SendMessageHook {

    @Override
    public String hookName() {
        return Constants.SAAS_SEND_MESSAGE_HOOK_NAME;
    }

    @Override
    public void sendMessageBefore(SendMessageContext context) {
        log.info("sendMessageBefore");
    }

    @Override
    public void sendMessageAfter(SendMessageContext context) {
        log.info("sendMessageAfter");
    }
}
